<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>Hello Vue.js</title>
</head>

<body>
    <div id="conditional-rendering">
        <button v-on:click="showHiddenClick">{{message}}显示/隐藏</button>
        <span v-if="seen">现在可以看见</span>
    </div>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script>
    const ConditionalRendering = {
        data() {
            return {
                seen: true,
                message: ' '
            }
        },
        methods: {
            showHiddenClick(){
                this.seen = !this.seen;
            }
        },
    }
    Vue.createApp(ConditionalRendering).mount("#conditional-rendering");
</script>

</html>